function couple_SetCookie(sName, sValue,iExpireDays) {
	if (iExpireDays){
		var dExpire = new Date();
		dExpire.setTime(dExpire.getTime()+parseInt(iExpireDays*24*60*60*1000));
		document.cookie = sName + "=" + escape(sValue) + "; expires=" + dExpire.toGMTString() + "; path=/";
	}
	else{
		document.cookie = sName + "=" + escape(sValue) + "; path=/";
	}
}

function setMark(){
	$("body:first").prepend("<div id=\"register\" style=\"display:none;position:absolute;z-index:1000;left:10px;right:10px;top:25px;padding:10px 20px 30px 20px;color:#FFF;background:#669;border:2px solid #AAF;\"></div>");
}
function regAlert(sMode){
	var $obj=$("#register");
	$.get(str00+"themes/"+strThemeName+"/plugin/register/register.asp?act=ping&mode="+sMode,"",function(data){
		$obj.html(data);
		$obj.fadeIn("slow");
	});
}
function regManual(sQuery){
	var $obj=$("#register");
	var sClose="<p style=\"float:right;\"><a href=\"javascript:void(0)\" onclick=\"regClose()\"><img src=\""+str00+"themes/"+strThemeName+"/style/default/closebig.png\" /></a></p>";
	$obj.html(sClose+"<p style=\"padding:20px 40px 20px 40px;font-size:16px;line-height:100%;\"><img src=\""+str00+"themes/"+strThemeName+"/style/default/loading.gif\" alt=\"loading...\"/> "+sLoading+"</p>");
	$obj.fadeIn("slow");
	$.get(str00+"themes/"+strThemeName+"/plugin/register/register.asp?act="+sQuery,"",function(data){
		$obj.html(data);
	});
}
function regVerify(){
	$("#register p.reg-result").remove();
	$("p.reg-button>input").attr("disabled","disabled");
	$("p.reg-button:last").after("<p class=\"reg-result\"><img src=\""+str00+"themes/"+strThemeName+"/style/default/loading.gif\" align=\"absmiddle\" alt=\"loading...\"/> "+sLoading+"</p>");
	$.post(str00+"themes/"+strThemeName+"/plugin/register/register.asp?act=reg",
		{
		"regName":$("#regName").val(),
		"regKey":$("#regKey").val()
		},
		function(data){
			$("#register p.reg-result").remove();
			$("#register").append(data);
			$("p.reg-button>input").removeAttr("disabled");
		}
	);
	return false;
}
function regClose(){
	couple_SetCookie("Couple_regHint","hidden",false);
	$("#register").fadeOut("normal");
}